package day7;

import org.junit.Test;

public class Demo {

	@Test
	public void test1() {
		MyDoor myDoor = new MyDoor();
		myDoor.open();
		myDoor.close();
		myDoor.alarm();
		
		OtherDoor otherDoor = new OtherDoor();
		otherDoor.close();
		otherDoor.open();
	}
	
	
	@Test
	public void test2() {
		Vehicle vehicle = new Vehicle();
		vehicle.move();
		vehicle.speedUp(10);
		vehicle.move();
	}
	
	@Test
	public void test3() {
		Point point = new Point(3, 5);
		point.movePoint(2, 4);
		System.out.println(point);
	}
	
	
	@Test
	public void test4() {
		Student student = new Student(1, "zhansgan", 23);
		// 实例变量、实例方法必须new出对象才能访问
		student.print();
		student.id = 32;
		// 静态变量既可以通过对象(student.country)调用也可以通过类名.(Student.country)的方式调用
		System.out.println(student.country);
		System.out.println(Student.country);
		student.show();
		Student.show();
	}
	
	
	
	
	
}
